import mongoose from "mongoose";
import {IBackTestTrade} from "../types";

const {Schema} = mongoose;

const BackTestKlineSchema = new Schema<IBackTestTrade>({
    symbol:{
        type:String, index: true},
    openTime:{
        type: Number, index: true},
    openPrice:{
        type: String
    },
    highPrice:{
        type: String
    },
    lowPrice:{
        type: String
    },
    closePrice:{
        type: String
    },
    volume:{
        type: String
    },
    closeTime:{
        type: Number
    },
    lEma:{type:String},
    mEma:{type:String},
    sEma: {type: String},
    lEmaRoc: {type: String},
    mEmaRoc: {type: String},
    sEmaRoc: {type: String},
    signal:{type:String},
});

BackTestKlineSchema.index({symbol:1, openTime:1});
export default BackTestKlineSchema;